Skip to content

Serve the website from Cloudflare Workers static assets - #16

Merged
zayenz merged 3 commits into
mainfrom
website-on-workers
Nov 16, 2026
Merged

zayenz merged 3 commits into
mainfrom
website-on-workers

Conversation

@zayenz

@zayenz zayenz commented Nov 16, 2026

Copy link
Copy Markdown
Member

GitHub Pages cannot renew its certificate while Cloudflare proxies the domain. Its expiry on 7 November caused the HTTP 526 outage. This PR moves the website onto Cloudflare so that no origin certificate is involved.

  • workers/website/wrangler.jsonc: the assets-only Worker gecode-website on the www.gecode.dev Custom Domain. The staging copy is on www-staging.gecode.dev. The existing /doc*, /robots.txt*, /e/* and classic .html route Workers keep precedence, and their pass-through reaches this Worker.
  • Classic /page and /page.html URLs now come from a generated _redirects file (308) instead of meta-refresh pages. _headers marks /_astro/* as immutable. CNAME is gone.
  • pages.yml: pushes to main build the site, deploy it with Wrangler in the website-production environment, then run the availability check.
  • The availability check now covers the apex redirect and the edge certificate expiry (at least 14 days left).
  • docs/operations.md describes the setup, deployment, rollback and the November incident.

Already done in Cloudflare:

  • The apex has a 301 Single Redirect rule to www, with a proxied AAAA 100:: record. The GitHub A records are deleted.
  • The deploy token gecode-website-deploy is stored in website-production.

Staging was checked on www-staging.gecode.dev. Wrangler replaces the www CNAME when the merge deploys to production.

Add an assets-only Worker for the Astro site, with a staging Custom
Domain and a production Custom Domain on www.gecode.dev, and a website
option in the edge Worker deployment workflow.
Replace the classic meta-refresh fallback pages with _redirects rules,
cache fingerprinted Astro assets for a year through _headers, and drop
the GitHub Pages CNAME file.
Pushes to main now deploy the built site to the gecode-website Worker
in the website-production environment and then run the availability
check. The check covers the apex redirect and edge certificate expiry
instead of the GitHub Pages origin certificate.
@zayenz
zayenz merged commit f28a507 into main Nov 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant